<div ng-controller="mainController">  <!-- ng-controller="mainController" -->

	<div>	<!--  ng-controller="pubEditorController" -->	
		<form ng-submit='submitPub()' id="form_pub">
			<textarea ng-model='pub.text' placeholder="Input text here..." ></textarea>
			<input id="imgSelector" type="file" fileread ='pub.img' accept="image/*" multiple/>
			<button type="submit" value="Publish" >Publish</button>
		</form>
	</div>

	<style>
	/*border: 1px solid black;*/
	/*background: rgba(142, 142, 142, 0.8);	*/

	div#pub_my
	{
		width: 600px;
	}

	div#pub_my .pub_item 
	{
	    
	}

	div#pub_my .pub_face
	{
	    /*background: rgba(142, 142, 142, 0.8);*/
	    width: 50px;	
	    height: 50px;
	    overflow: hidden;
	    float: left;	/* 靠左*/
	}

	div#pub_my .pub_face img
	{
	    width: 50px;	
	    height: 50px;
	}

	div#pub_my .pub_details
	{
	    /*float: left;*/
	    margin-left: 60px;	
	}

	div#pub_my .pub_details .pub_username
	{
		margin-bottom: 5px;
	}

	div#pub_my .pub_details .pub_text
	{
		margin-bottom: 5px;
	}

	div#pub_my .pub_details .pub_imgs
	{
		margin-bottom: 5px;
	}

	div#pub_my .pub_details .pub_imgs img
	{
		margin-right: 5px;
	}

	div#pub_my .pub_details .pub_time
	{
		margin-bottom: 5px;
	}

	table.users th,td
	{
		border: 1px solid black;
	}
    
    </style>

	<div id="pub_my"><!--  ng-controller='pubsDisplayController' -->

		<button value="Display More" ng-click="getPubs()">Refresh</button>

		<div>
			<div class="pub_item" ng-repeat = "pub in publications">
				<!-- 头像区，目前尚无此功能 -->
				<div class= "pub_face"><img src="info.php?obj=publication&method=getimg&idpub=86&index=0"></div>
				<!-- pub details区， 包括用户名称，图文，时间等信息 -->
				<div class="pub_details">
					<div class="pub_username">
						<a-personal userid={{pub.iduser}} usernickname={{pub.usernickname}}></a-personal>
						<!-- <a href="#/personal/{{pub.iduser}}">{{pub.usernickname}} ({{pub.iduser}})</a> -->
					</div>
					<div class="pub_text">
						{{pub.text}}
					</div>
					<div class="pub_imgs">
						<imgs-player idpub= "{{pub.idpub}}" numimgs = "{{pub.numpics}}" width="60"/>
					</div>
					<div class="pub_time">
						{{pub.time}}
					</div>
				</div>
				<hr/>
			</div>
		</div>

	</div>
</div>
